import { T_srv, Tsrv, ifs, ts, tvs, vue } from '@/services';
import { I_cmd, T_cmd } from './command';
import { N_cBaseChart } from './types';

/**
 * 默认图表配置
 */
export const DEFAULT_CHART_CONFIG: N_cBaseChart.ChartConfig = {
  chart: {
    id: 'default-chart',
    type: 'line',
    title: {
      text: '实时数据监控',
      left: 'center'
    },
    width: '100%',
    height: '400px',
    theme: 'default'
  },
  data: {
    source: {
      type: 'static',
      refreshInterval: 5000,
      maxPoints: 1000

    },
    mapping: {
      xAxis: 't',
      series: [
        {
          name: '数据系列1',
          field: 'v',
          unit: '',
          code: 'my089',
          color: '#5470c6'
        },
        {
          name: '数据系列2',
          field: 'v',
          unit: '',
          code: 'my090',
          color: '#96c654ff'
        }
      ]
    },
    transform: {
      deduplication: {
        enabled: true,
        threshold: 0.001,
        strategy: 'average'
      }
    }
  },
  dataZoom: [
    {
      type: 'inside',
      yAxisIndex: [0],
      start: 0,
      end: 100,
      bottom: '5%',  // 放置在底部5%的位置
      height: '5%'   // 高度为5%
    },
    {
      type: 'slider',
      show: true,
      xAxisIndex: [0],
      start: 0,
      end: 100,
      bottom: '5%',  // 与inside类型对齐
      height: '5%'
    }
  ],
  xAxis: {
    type: 'category',
    name: '时间',
    nameLocation: 'end',
    splitLine: {
      show: true
    }
  },
  yAxis: {
    type: 'value',
    name: '数值',
    nameLocation: 'end',
    splitLine: {
      show: true
    }
  },
  series: [
    {
      name: '数据系列1',
      type: 'line',
      smooth: true,
      showSymbol: false,
      animation: {
        enabled: true,
        duration: 300,
        easing: 'cubicOut'
      }
    },
    {
      name: '数据系列2',
      type: 'line',
      smooth: true,
      showSymbol: false,
      animation: {
        enabled: true,
        duration: 300,
        easing: 'cubicOut'
      }
    }
  ],
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'cross',
      label: {
        backgroundColor: '#6a7985'
      }
    }
  },
  legend: {
    data: ['数据系列1', '数据系列2'],
    right: 10,
    top: 10
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '12%',  // 为dataZoom留出12%的空间
    containLabel: true
  }
};

/**
 * 配置验证函数
 */
export function validateChartConfig(config: N_cBaseChart.ChartConfig): boolean {
  if (!config.chart || !config.chart.id || !config.chart.type) {
    console.error('图表配置缺少必要字段: chart.id 或 chart.type');
    return false;
  }

  if (!config.data || !config.data.source || !config.data.mapping) {
    console.error('数据配置缺少必要字段');
    return false;
  }

  if (config.data.source.type === 'scada-api' && !config.data.source.endpoint) {
    console.error('SCADA API类型需要配置endpoint');
    return false;
  }

  if (!config.xAxis || !config.yAxis) {
    console.error('坐标轴配置缺少必要字段');
    return false;
  }

  if (!config.series || config.series.length === 0) {
    console.error('系列配置不能为空');
    return false;
  }

  return true;
}

/**
 * 配置合并函数
 */
export function mergeChartConfig(
  baseConfig: N_cBaseChart.ChartConfig,
  overrideConfig: Partial<N_cBaseChart.ChartConfig>
): N_cBaseChart.ChartConfig {
  return {
    ...baseConfig,
    ...overrideConfig,
    chart: {
      ...baseConfig.chart,
      ...overrideConfig.chart
    },
    data: {
      ...baseConfig.data,
      ...overrideConfig.data,
      source: {
        ...baseConfig.data.source,
        ...overrideConfig.data?.source
      },
      mapping: {
        ...baseConfig.data.mapping,
        ...overrideConfig.data?.mapping,
        series: [
          ...(baseConfig.data.mapping.series || []),
          ...(overrideConfig.data?.mapping?.series || [])
        ]
      },
      transform: {
        ...baseConfig.data.transform,
        ...overrideConfig.data?.transform
      }
    },
    xAxis: {
      ...baseConfig.xAxis,
      ...overrideConfig.xAxis
    },
    yAxis: {
      ...baseConfig.yAxis,
      ...overrideConfig.yAxis
    },
    series: [
      ...(baseConfig.series || []),
      ...(overrideConfig.series || [])
    ]
  };
}

/**
 * 获取有效的图表配置
 */
function getValidChartConfig(config: Partial<N_cBaseChart.ChartConfig>): N_cBaseChart.ChartConfig {
  const baseConfig = DEFAULT_CHART_CONFIG;

  if (!config || Object.keys(config).length === 0) {
    return baseConfig;
  }

  const mergedConfig = mergeChartConfig(baseConfig, config);

  if (!validateChartConfig(mergedConfig)) {
    console.warn('配置验证失败，使用默认配置');
    return baseConfig;
  }

  return mergedConfig;
}



export function getConfig() {
  return {
    "my092": {
      "total": 13756,
      "d": [{
        "t": "2025-07-26T00:48:33.929Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:57:05.932Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:39:45.931Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:05:21.93Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:34:46.028Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:39:02.429Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:43:18.227Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:47:34.331Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:51:50.428Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:56:06.328Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:00:22.128Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:04:38.331Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:08:54.229Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:13:10.428Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:17:26.23Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:21:42.031Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:25:58.232Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:30:14.029Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:34:30.028Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:38:46.228Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:43:02.231Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:47:18.032Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:51:34.029Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:55:50.031Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:00:06.029Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:04:22.23Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:08:38.43Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:12:54.031Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:17:10.43Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:21:26.032Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:25:42.329Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:29:58.129Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:34:14.03Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:38:30.429Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:42:46.031Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:51:18.428Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:55:34.13Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T06:59:50.331Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T07:04:06.33Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T07:08:22.029Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T07:12:38.029Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T07:16:54.23Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T07:21:10.431Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T07:25:26.33Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T07:33:58.028Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T07:38:14.028Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:01:27.929Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:14:15.928Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:22:47.929Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:18:15.93Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:17:59.93Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:22:15.931Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:39:03.928Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:47:35.931Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:56:07.929Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:04:39.931Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:08:55.929Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T05:38:47.929Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:01:44.13Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:06:00.331Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:10:16.029Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:14:32.431Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:18:48.229Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:23:04.03Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:27:20.128Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:31:36.228Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:35:52.129Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:40:08.431Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:44:24.229Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:48:40.128Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:52:56.23Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:57:12.232Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:05:44.028Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:10:00.23Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:18:32.428Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:27:04.129Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:31:20.228Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:35:36.228Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:39:52.131Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:44:08.331Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:48:24.329Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:52:40.429Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T01:56:56.329Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:01:12.03Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:05:28.131Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:09:44.429Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:14:00.228Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:22:32.031Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:26:48.428Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:31:04.332Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:35:20.231Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:39:36.232Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:43:52.329Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:48:08.028Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:52:24.328Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T02:56:40.429Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:00:56.03Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:05:12.23Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:09:28.329Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:13:44.329Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:26:32.43Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:30:48.431Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:35:04.228Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:39:20.329Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:43:36.228Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:47:52.429Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:52:08.229Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T03:56:24.23Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:00:40.131Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:04:56.331Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:09:12.028Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:13:28.329Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T04:17:44.229Z",
        "v": 50,
        "label": "0"
      }, {
        "t": "2025-07-26T00:53:08.03Z",
        "v": 50,
        "label": "0"
      }],
      "recErrs": null
    },
    "my093": {
      "total": 13756,
      "d": [{
        "t": "2025-07-26T00:48:33.929Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:57:05.932Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:39:45.931Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:05:21.93Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:34:46.028Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:39:02.429Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:43:18.227Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:47:34.331Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:51:50.428Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:56:06.328Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:00:22.128Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:04:38.331Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:08:54.229Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:13:10.428Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:17:26.23Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:21:42.031Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:25:58.232Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:30:14.029Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:34:30.028Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:38:46.228Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:43:02.231Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:47:18.032Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:51:34.029Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:55:50.031Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:00:06.029Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:04:22.23Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:08:38.43Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:12:54.031Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:17:10.43Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:21:26.032Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:25:42.329Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:29:58.129Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:34:14.03Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:38:30.429Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:42:46.031Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:51:18.428Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:55:34.13Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T06:59:50.331Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T07:04:06.33Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T07:08:22.029Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T07:12:38.029Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T07:16:54.23Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T07:21:10.431Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T07:25:26.33Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T07:33:58.028Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T07:38:14.028Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:01:27.929Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:14:15.928Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:22:47.929Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:18:15.93Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:17:59.93Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:22:15.931Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:39:03.928Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:47:35.931Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:56:07.929Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:04:39.931Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:08:55.929Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T05:38:47.929Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:01:44.13Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:06:00.331Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:10:16.029Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:14:32.431Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:18:48.229Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:23:04.03Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:27:20.128Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:31:36.228Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:35:52.129Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:40:08.431Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:44:24.229Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:48:40.128Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:52:56.23Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:57:12.232Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:05:44.028Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:10:00.23Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:18:32.428Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:27:04.129Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:31:20.228Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:35:36.228Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:39:52.131Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:44:08.331Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:48:24.329Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:52:40.429Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T01:56:56.329Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:01:12.03Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:05:28.131Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:09:44.429Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:14:00.228Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:22:32.031Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:26:48.428Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:31:04.332Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:35:20.231Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:39:36.232Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:43:52.329Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:48:08.028Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:52:24.328Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T02:56:40.429Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:00:56.03Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:05:12.23Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:09:28.329Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:13:44.329Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:26:32.43Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:30:48.431Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:35:04.228Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:39:20.329Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:43:36.228Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:47:52.429Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:52:08.229Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T03:56:24.23Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:00:40.131Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:04:56.331Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:09:12.028Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:13:28.329Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T04:17:44.229Z",
        "v": 40,
        "label": "0"
      }, {
        "t": "2025-07-26T00:53:08.03Z",
        "v": 40,
        "label": "0"
      }],
      "recErrs": null
    }
  }
}

const pLColumns = () => {
  return [
    {
      "fieldID": "222308141738496006",
      "field": "f_key",
      "type": "varchar(100)",
      "isShow": true,
      "notNull": false,
      "defValue": "",
      "comment": "",
      "selectionID": null,
      "disabled": false,
      "defaultFilter": false,
      "fixedLeft": false,
      "fixedRight": false,
      "nodeData": false,
      "footerMethod": null,
      "formatter": {
        "type": "",
        "decimal": 0,
        "thousandmark": false,
        "currency": ""
      },
      "actions": [],
      "cascadeFilter": "",
      "auxProp": "",
      "minWidth": "",
      "appWeight": "",
      "isDes": false,
      "many2one": "",
      "align": "left",
      "subQuery": "",
      "span": 6
    }, 
    {
      "fieldID": "222301287968935965",
      "field": "f_comment",
      "type": "varchar(200)",
      "isShow": true,
      "notNull": false,
      "defValue": "",
      "comment": "",
      "selectionID": null,
      "disabled": false,
      "defaultFilter": false,
      "fixedLeft": false,
      "fixedRight": false,
      "nodeData": false,
      "footerMethod": null,
      "formatter": {
        "type": "",
        "decimal": 0,
        "thousandmark": false,
        "currency": ""
      },
      "actions": [],
      "cascadeFilter": "",
      "auxProp": "",
      "minWidth": "",
      "appWeight": "",
      "isDes": false,
      "many2one": "",
      "align": "left",
      "subQuery": "",
      "span": 6
    }
  ];
};


export { I_cmd, N_cBaseChart, T_cmd, T_srv, Tsrv, getValidChartConfig, ifs, pLColumns, ts, tvs, vue };
